package de.hmm.hwip.osgi.ipc;

import android.content.Context;
import de.hmm.hwip.general.IAndroidContext;
import de.hmm.hwip.osgi.view.OSGiAdminConsole;
import de.hmm.hwip.service.MessengerService;

/**
 * Class to Connect the android application / service with the OSGi framework.
 * it transfers the application context to the framework and
 * receives data to show in gui
 * 
 * @author johannes mendel
 * @version 06.11.2013 
 */
public class ApplicationConnector implements IAndroidContext{
	
	/**
	 * Method to transfer Context from Application / Service to OSGi-Framework
	 * e.g. to safe data or use special Android-Objects
	 * 
	 */
	@Override
	public Context transferContext(){
		return MessengerService.getCotnext();
	}

	/**
	 * Method to transfer data from framework to the gui
	 */
	@Override
	public void transferData(String data) {
		OSGiAdminConsole.listDataValues(data);
	}
}
